﻿@using CodeCamp.Models.EventMgmt
@model SponsorListViewModel

@if (Model == null)
{
    <div>Error - no list</div>
}
else
{
    <table>
        <tr><th>&nbsp;</th><th>Id</th><th>Name</th><th>Width</th><th>Height</th><th>Image URL</th><th>URL</th></tr>
        @foreach (SponsorEditModel sponsor in Model.Sponsors)
        {
            <tr>
                <td>@Html.ActionLink("Edit", "SponsorEdit", "EventMgmt", new { id = sponsor.SponsorId }, null)</td>
                <td>@sponsor.SponsorId</td>
                <td>@sponsor.Name</td>
                <td>@sponsor.ImageWidth</td>
                <td>@sponsor.ImageHeight</td>
                <td>@sponsor.ImageUrl</td>
                <td><a href="@sponsor.Url" target="_blank">@sponsor.Url</a></td>
            </tr>
        }
    </table>
}

